Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy DIV by zero behavior for handling modulo by zero #54

Merged
merged 1 commit into from
May 21, 2024

Conversation

DerelictDrone
Copy link
Member

Div checks if the abs of a number is less than 0.000000000001 (as 1e-12), if this is the case it will send interrupt 3 and not modify the registers value

This PR brings the same behavior to modulo, which was just returning math.fmod(op1,op2), preventing setting a register to NaN and potentially causing errors by outputting it or operating on it.
gmod_qCeSpRztKf

@DerelictDrone DerelictDrone merged commit 0b36627 into wiremod:master May 21, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants